﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Org.BouncyCastle.Crypto;

namespace LockCrypt.Core {
    public interface IEncryptionService {
        /// <summary>
        /// Gets the encryption algorithm.
        /// </summary>
        /// <value>The encryption algorithm.</value>
        EncryptionProviders EncryptionAlgorithm { get; }

        /// <summary>
        /// Gets or sets the encryption key.
        /// </summary>
        /// <value>The encryption key.</value>
        string EncryptionKey { get; set; }
        

        /// <summary>
        /// Gets the equivalent key for a password, as a string.
        /// </summary>
        /// <param name="password">The password.</param>
        /// <returns>The string equivalent of the encryption key which would be used for the password.</returns>
        string GetKey(string password);

        /// <summary>
        /// Gets the equivalent key for a password.
        /// </summary>
        /// <param name="password">The password.</param>
        /// <returns>The encryption key which would be used for the password.</returns>
        byte[] GetKeyBytes(string password);

        byte[] Encrypt(byte[] input);
        byte[] Decrypt(byte[] input);
        byte[] EncryptString(string input);
        string DecryptString(byte[] input);
        byte[] EncryptObject(object obj);
        T DecryptObject<T>(byte[] value, T defaultValue);
    }
}
